]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
selectArea: Ignore motion events once we got a result
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 10 Sep 2019 06:49:50 +0000 (08:49 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 10 Sep 2019 20:08:25 +0000 (22:08 +0200)
When selecting an area for screenshot we monitor the events while we've valid
coordinates in order to redraw the rubber band.
However, we don't stop ignore the motion events after button release and so
while animating. This might cause an unwanted effect if moving the mouse away
during fade out that is way more visible slowing-down the animations.

To fix this ignore any motion event once we've set the results.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/711

js/ui/screenshot.js

index 377879bfb737859a0f66a38b5ef847823a1f1170..c9ede2fc1d0acb1256856b661320d52841f24f79 100644 (file)
@@ -271,7 +271,7 @@ var SelectArea = class {
     }
 
     _onMotionEvent(actor, event) {
-        if (this._startX == -1 || this._startY == -1)
+        if (this._startX == -1 || this._startY == -1 || this._result)
             return Clutter.EVENT_PROPAGATE;
 
         [this._lastX, this._lastY] = event.get_coords();